/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */#ifndef jit_IonTypes_h#define jit_IonTypes_h#include"mozilla/HashFunctions.h"#include<algorithm>#include"jsfriendapi.h"#include"jstypes.h"#include"js/GCAPI.h"#include"js/Value.h"#include"vm/String.h"namespacejs{namespacejit{typedefuint32_tRecoverOffset;typedefuint32_tSnapshotOffset;typedefuint32_tBailoutId;// The maximum size of any buffer associated with an assembler or code object.// This is chosen to not overflow a signed integer, leaving room for an extra// bit on offsets.staticconstuint32_tMAX_BUFFER_SIZE=(1<<30)-1;// Maximum number of scripted arg slots.staticconstuint32_tSNAPSHOT_MAX_NARGS=127;staticconstSnapshotOffsetINVALID_RECOVER_OFFSET=uint32_t(-1);staticconstSnapshotOffsetINVALID_SNAPSHOT_OFFSET=uint32_t(-1);// Different kinds of bailouts. When extending this enum, make sure to check// the bits reserved for bailout kinds in Bailouts.henumBailoutKind{// Normal bailouts, that don't need to be handled specially when restarting// in baseline.// An inevitable bailout (MBail instruction or type barrier that always bails)Bailout_Inevitable,// Bailing out during a VM call. Many possible causes that are hard// to distinguish statically at snapshot construction time.// We just lump them together.Bailout_DuringVMCall,// Call to a non-JSFunction (problem for |apply|)Bailout_NonJSFunctionCallee,// Dynamic scope chain lookup produced |undefined|Bailout_DynamicNameNotFound,// Input string contains 'arguments' or 'eval'Bailout_StringArgumentsEval,// Bailout on overflow, but don't immediately invalidate.// Used for abs, sub and LoadUnboxedScalar (when loading a uint32 that// doesn't fit in an int32).Bailout_Overflow,// floor, ceiling and round bail if input is NaN, if output would be -0 or// doesn't fit in int32 rangeBailout_Round,// Non-primitive value used as input for ToDouble, ToInt32, ToString, etc.// For ToInt32, can also mean that input can't be converted without precision// loss (e.g. 5.5).Bailout_NonPrimitiveInput,// For ToInt32, would lose precision when converting (e.g. 5.5).Bailout_PrecisionLoss,// We tripped a type barrier (object was not in the expected TypeSet)Bailout_TypeBarrierO,// We tripped a type barrier (value was not in the expected TypeSet)Bailout_TypeBarrierV,// We tripped a type monitor (wrote an unexpected type in a property)Bailout_MonitorTypes,// We hit a hole in an array.Bailout_Hole,// Array access with negative indexBailout_NegativeIndex,// Pretty specific case:// - need a type barrier on a property write// - all but one of the observed types have property types that reflect the value// - we need to guard that we're not given an object of that one other type// also used for the unused GuardClass instructionBailout_ObjectIdentityOrTypeGuard,// Unbox expects a given type, bails out if it doesn't get it.Bailout_NonInt32Input,Bailout_NonNumericInput,// unboxing a double works with int32 tooBailout_NonBooleanInput,Bailout_NonObjectInput,Bailout_NonStringInput,Bailout_NonSymbolInput,// SIMD Unbox expects a given type, bails out if it doesn't match.Bailout_UnexpectedSimdInput,// Atomic operations require shared memory, bail out if the typed array// maps unshared memory.Bailout_NonSharedTypedArrayInput,// We hit a |debugger;| statement.Bailout_Debugger,// |this| used uninitialized in a derived constructorBailout_UninitializedThis,// Derived constructors must return object or undefinedBailout_BadDerivedConstructorReturn,// We hit this code for the first time.Bailout_FirstExecution,// END Normal bailouts// Bailouts caused by invalid assumptions based on Baseline code.// Causes immediate invalidation.// Like Bailout_Overflow, but causes immediate invalidation.Bailout_OverflowInvalidate,// Like NonStringInput, but should cause immediate invalidation.// Used for jsop_iternext.Bailout_NonStringInputInvalidate,// Used for integer division, multiplication and modulo.// If there's a remainder, bails to return a double.// Can also signal overflow or result of -0.// Can also signal division by 0 (returns inf, a double).Bailout_DoubleOutput,// END Invalid assumptions bailouts// A bailout at the very start of a function indicates that there may be// a type mismatch in the arguments that necessitates a reflow.Bailout_ArgumentCheck,// A bailout triggered by a bounds-check failure.Bailout_BoundsCheck,// A bailout triggered by a typed object whose backing buffer was detached.Bailout_Detached,// A shape guard based on TI information failed.// (We saw an object whose shape does not match that / any of those observed// by the baseline IC.)Bailout_ShapeGuard,// When we're trying to use an uninitialized lexical.Bailout_UninitializedLexical,// A bailout to baseline from Ion on exception to handle Debugger hooks.Bailout_IonExceptionDebugMode};inlineconstchar*BailoutKindString(BailoutKindkind){switch(kind){// Normal bailouts.caseBailout_Inevitable:return"Bailout_Inevitable";caseBailout_DuringVMCall:return"Bailout_DuringVMCall";caseBailout_NonJSFunctionCallee:return"Bailout_NonJSFunctionCallee";caseBailout_DynamicNameNotFound:return"Bailout_DynamicNameNotFound";caseBailout_StringArgumentsEval:return"Bailout_StringArgumentsEval";caseBailout_Overflow:return"Bailout_Overflow";caseBailout_Round:return"Bailout_Round";caseBailout_NonPrimitiveInput:return"Bailout_NonPrimitiveInput";caseBailout_PrecisionLoss:return"Bailout_PrecisionLoss";caseBailout_TypeBarrierO:return"Bailout_TypeBarrierO";caseBailout_TypeBarrierV:return"Bailout_TypeBarrierV";caseBailout_MonitorTypes:return"Bailout_MonitorTypes";caseBailout_Hole:return"Bailout_Hole";caseBailout_NegativeIndex:return"Bailout_NegativeIndex";caseBailout_ObjectIdentityOrTypeGuard:return"Bailout_ObjectIdentityOrTypeGuard";caseBailout_NonInt32Input:return"Bailout_NonInt32Input";caseBailout_NonNumericInput:return"Bailout_NonNumericInput";caseBailout_NonBooleanInput:return"Bailout_NonBooleanInput";caseBailout_NonObjectInput:return"Bailout_NonObjectInput";caseBailout_NonStringInput:return"Bailout_NonStringInput";caseBailout_NonSymbolInput:return"Bailout_NonSymbolInput";caseBailout_UnexpectedSimdInput:return"Bailout_UnexpectedSimdInput";caseBailout_NonSharedTypedArrayInput:return"Bailout_NonSharedTypedArrayInput";caseBailout_Debugger:return"Bailout_Debugger";caseBailout_UninitializedThis:return"Bailout_UninitializedThis";caseBailout_BadDerivedConstructorReturn:return"Bailout_BadDerivedConstructorReturn";caseBailout_FirstExecution:return"Bailout_FirstExecution";// Bailouts caused by invalid assumptions.caseBailout_OverflowInvalidate:return"Bailout_OverflowInvalidate";caseBailout_NonStringInputInvalidate:return"Bailout_NonStringInputInvalidate";caseBailout_DoubleOutput:return"Bailout_DoubleOutput";// Other bailouts.caseBailout_ArgumentCheck:return"Bailout_ArgumentCheck";caseBailout_BoundsCheck:return"Bailout_BoundsCheck";caseBailout_Detached:return"Bailout_Detached";caseBailout_ShapeGuard:return"Bailout_ShapeGuard";caseBailout_UninitializedLexical:return"Bailout_UninitializedLexical";caseBailout_IonExceptionDebugMode:return"Bailout_IonExceptionDebugMode";default:MOZ_CRASH("Invalid BailoutKind");}}staticconstuint32_tELEMENT_TYPE_BITS=5;staticconstuint32_tELEMENT_TYPE_SHIFT=0;staticconstuint32_tELEMENT_TYPE_MASK=(1<<ELEMENT_TYPE_BITS)-1;staticconstuint32_tVECTOR_SCALE_BITS=3;staticconstuint32_tVECTOR_SCALE_SHIFT=ELEMENT_TYPE_BITS+ELEMENT_TYPE_SHIFT;staticconstuint32_tVECTOR_SCALE_MASK=(1<<VECTOR_SCALE_BITS)-1;classSimdConstant{public:enumType{Int8x16,Int16x8,Int32x4,Float32x4,Undefined=-1};typedefint8_tI8x16[16];typedefint16_tI16x8[8];typedefint32_tI32x4[4];typedeffloatF32x4[4];private:Typetype_;union{I8x16i8x16;I16x8i16x8;I32x4i32x4;F32x4f32x4;}u;booldefined()const{returntype_!=Undefined;}public:// Doesn't have a default constructor, as it would prevent it from being// included in unions.staticSimdConstantCreateX16(constint8_t*array){SimdConstantcst;cst.type_=Int8x16;memcpy(cst.u.i8x16,array,sizeof(cst.u));returncst;}staticSimdConstantSplatX16(int8_tv){SimdConstantcst;cst.type_=Int8x16;std::fill_n(cst.u.i8x16,16,v);returncst;}staticSimdConstantCreateX8(constint16_t*array){SimdConstantcst;cst.type_=Int16x8;memcpy(cst.u.i16x8,array,sizeof(cst.u));returncst;}staticSimdConstantSplatX8(int16_tv){SimdConstantcst;cst.type_=Int16x8;std::fill_n(cst.u.i16x8,8,v);returncst;}staticSimdConstantCreateX4(constint32_t*array){SimdConstantcst;cst.type_=Int32x4;memcpy(cst.u.i32x4,array,sizeof(cst.u));returncst;}staticSimdConstantSplatX4(int32_tv){SimdConstantcst;cst.type_=Int32x4;std::fill_n(cst.u.i32x4,4,v);returncst;}staticSimdConstantCreateX4(constfloat*array){SimdConstantcst;cst.type_=Float32x4;memcpy(cst.u.f32x4,array,sizeof(cst.u));returncst;}staticSimdConstantSplatX4(floatv){SimdConstantcst;cst.type_=Float32x4;std::fill_n(cst.u.f32x4,4,v);returncst;}// Overloads for use by templates.staticSimdConstantCreateSimd128(constint8_t*array){returnCreateX16(array);}staticSimdConstantCreateSimd128(constint16_t*array){returnCreateX8(array);}staticSimdConstantCreateSimd128(constint32_t*array){returnCreateX4(array);}staticSimdConstantCreateSimd128(constfloat*array){returnCreateX4(array);}Typetype()const{MOZ_ASSERT(defined());returntype_;}// Get the raw bytes of the constant.constvoid*bytes()const{returnu.i8x16;}constI8x16&asInt8x16()const{MOZ_ASSERT(defined()&&type_==Int8x16);returnu.i8x16;}constI16x8&asInt16x8()const{MOZ_ASSERT(defined()&&type_==Int16x8);returnu.i16x8;}constI32x4&asInt32x4()const{MOZ_ASSERT(defined()&&type_==Int32x4);returnu.i32x4;}constF32x4&asFloat32x4()const{MOZ_ASSERT(defined()&&type_==Float32x4);returnu.f32x4;}booloperator==(constSimdConstant&rhs)const{MOZ_ASSERT(defined()&&rhs.defined());if(type()!=rhs.type())returnfalse;// Takes negative zero into accuont, as it's a bit comparison.returnmemcmp(&u,&rhs.u,sizeof(u))==0;}booloperator!=(constSimdConstant&rhs)const{return!operator==(rhs);}// SimdConstant is a HashPolicytypedefSimdConstantLookup;staticHashNumberhash(constSimdConstant&val){uint32_thash=mozilla::HashBytes(&val.u,sizeof(val.u));returnmozilla::AddToHash(hash,val.type_);}staticboolmatch(constSimdConstant&lhs,constSimdConstant&rhs){returnlhs==rhs;}};// The ordering of this enumeration is important: Anything < Value is a// specialized type. Furthermore, anything < String has trivial conversion to// a number.enumclassMIRType{Undefined,Null,Boolean,Int32,Int64,Double,Float32,// Types above have trivial conversion to a number.String,Symbol,// Types above are primitive (including undefined and null).Object,MagicOptimizedArguments,// JS_OPTIMIZED_ARGUMENTS magic value.MagicOptimizedOut,// JS_OPTIMIZED_OUT magic value.MagicHole,// JS_ELEMENTS_HOLE magic value.MagicIsConstructing,// JS_IS_CONSTRUCTING magic value.MagicUninitializedLexical,// JS_UNINITIALIZED_LEXICAL magic value.// Types above are specialized.Value,SinCosDouble,// Optimizing a sin/cos to sincos.ObjectOrNull,None,// Invalid, used as a placeholder.Slots,// A slots vectorElements,// An elements vectorPointer,// An opaque pointer that receives no special treatmentShape,// A Shape pointer.ObjectGroup,// An ObjectGroup pointer.Last=ObjectGroup,// Representing both SIMD.IntBxN and SIMD.UintBxN.Int8x16=Int32|(4<<VECTOR_SCALE_SHIFT),Int16x8=Int32|(3<<VECTOR_SCALE_SHIFT),Int32x4=Int32|(2<<VECTOR_SCALE_SHIFT),Float32x4=Float32|(2<<VECTOR_SCALE_SHIFT),Bool8x16=Boolean|(4<<VECTOR_SCALE_SHIFT),Bool16x8=Boolean|(3<<VECTOR_SCALE_SHIFT),Bool32x4=Boolean|(2<<VECTOR_SCALE_SHIFT),Doublex2=Double|(1<<VECTOR_SCALE_SHIFT)};staticinlineboolIsSimdType(MIRTypetype){return((unsigned(type)>>VECTOR_SCALE_SHIFT)&VECTOR_SCALE_MASK)!=0;}// Returns the number of vector elements (hereby called "length") for a given// SIMD kind. It is the Y part of the name "Foo x Y".staticinlineunsignedSimdTypeToLength(MIRTypetype){MOZ_ASSERT(IsSimdType(type));return1<<((unsigned(type)>>VECTOR_SCALE_SHIFT)&VECTOR_SCALE_MASK);}// Get the type of the individual lanes in a SIMD type.// For example, Int32x4 -> Int32, Float32x4 -> Float32 etc.staticinlineMIRTypeSimdTypeToLaneType(MIRTypetype){MOZ_ASSERT(IsSimdType(type));static_assert(unsigned(MIRType::Last)<=ELEMENT_TYPE_MASK,"ELEMENT_TYPE_MASK should be larger than the last MIRType");returnMIRType((unsigned(type)>>ELEMENT_TYPE_SHIFT)&ELEMENT_TYPE_MASK);}// Get the type expected when inserting a lane into a SIMD type.// This is the argument type expected by the MSimdValue constructors as well as// MSimdSplat and MSimdInsertElement.staticinlineMIRTypeSimdTypeToLaneArgumentType(MIRTypetype){MIRTypelaneType=SimdTypeToLaneType(type);// Boolean lanes should be pre-converted to an Int32 with the values 0 or -1.// All other lane types are inserted directly.returnlaneType==MIRType::Boolean?MIRType::Int32:laneType;}staticinlineMIRTypeMIRTypeFromValueType(JSValueTypetype){// This function does not deal with magic types. Magic constants should be// filtered out in MIRTypeFromValue.switch(type){caseJSVAL_TYPE_DOUBLE:returnMIRType::Double;caseJSVAL_TYPE_INT32:returnMIRType::Int32;caseJSVAL_TYPE_UNDEFINED:returnMIRType::Undefined;caseJSVAL_TYPE_STRING:returnMIRType::String;caseJSVAL_TYPE_SYMBOL:returnMIRType::Symbol;caseJSVAL_TYPE_BOOLEAN:returnMIRType::Boolean;caseJSVAL_TYPE_NULL:returnMIRType::Null;caseJSVAL_TYPE_OBJECT:returnMIRType::Object;caseJSVAL_TYPE_UNKNOWN:returnMIRType::Value;default:MOZ_CRASH("unexpected jsval type");}}staticinlineJSValueTypeValueTypeFromMIRType(MIRTypetype){switch(type){caseMIRType::Undefined:returnJSVAL_TYPE_UNDEFINED;caseMIRType::Null:returnJSVAL_TYPE_NULL;caseMIRType::Boolean:returnJSVAL_TYPE_BOOLEAN;caseMIRType::Int32:returnJSVAL_TYPE_INT32;caseMIRType::Float32:// Fall through, there's no JSVAL for Float32caseMIRType::Double:returnJSVAL_TYPE_DOUBLE;caseMIRType::String:returnJSVAL_TYPE_STRING;caseMIRType::Symbol:returnJSVAL_TYPE_SYMBOL;caseMIRType::MagicOptimizedArguments:caseMIRType::MagicOptimizedOut:caseMIRType::MagicHole:caseMIRType::MagicIsConstructing:caseMIRType::MagicUninitializedLexical:returnJSVAL_TYPE_MAGIC;default:MOZ_ASSERT(type==MIRType::Object);returnJSVAL_TYPE_OBJECT;}}staticinlineJSValueTagMIRTypeToTag(MIRTypetype){returnJSVAL_TYPE_TO_TAG(ValueTypeFromMIRType(type));}staticinlineconstchar*StringFromMIRType(MIRTypetype){switch(type){caseMIRType::Undefined:return"Undefined";caseMIRType::Null:return"Null";caseMIRType::Boolean:return"Bool";caseMIRType::Int32:return"Int32";caseMIRType::Int64:return"Int64";caseMIRType::Double:return"Double";caseMIRType::Float32:return"Float32";caseMIRType::String:return"String";caseMIRType::Symbol:return"Symbol";caseMIRType::Object:return"Object";caseMIRType::MagicOptimizedArguments:return"MagicOptimizedArguments";caseMIRType::MagicOptimizedOut:return"MagicOptimizedOut";caseMIRType::MagicHole:return"MagicHole";caseMIRType::MagicIsConstructing:return"MagicIsConstructing";caseMIRType::MagicUninitializedLexical:return"MagicUninitializedLexical";caseMIRType::Value:return"Value";caseMIRType::SinCosDouble:return"SinCosDouble";caseMIRType::ObjectOrNull:return"ObjectOrNull";caseMIRType::None:return"None";caseMIRType::Slots:return"Slots";caseMIRType::Elements:return"Elements";caseMIRType::Pointer:return"Pointer";caseMIRType::Shape:return"Shape";caseMIRType::ObjectGroup:return"ObjectGroup";caseMIRType::Int32x4:return"Int32x4";caseMIRType::Int16x8:return"Int16x8";caseMIRType::Int8x16:return"Int8x16";caseMIRType::Float32x4:return"Float32x4";caseMIRType::Bool32x4:return"Bool32x4";caseMIRType::Bool16x8:return"Bool16x8";caseMIRType::Bool8x16:return"Bool8x16";caseMIRType::Doublex2:return"Doublex2";}MOZ_CRASH("Unknown MIRType.");}staticinlineboolIsIntType(MIRTypetype){returntype==MIRType::Int32||type==MIRType::Int64;}staticinlineboolIsNumberType(MIRTypetype){returntype==MIRType::Int32||type==MIRType::Double||type==MIRType::Float32||type==MIRType::Int64;}staticinlineboolIsTypeRepresentableAsDouble(MIRTypetype){returntype==MIRType::Int32||type==MIRType::Double||type==MIRType::Float32;}staticinlineboolIsFloatType(MIRTypetype){returntype==MIRType::Int32||type==MIRType::Float32;}staticinlineboolIsFloatingPointType(MIRTypetype){returntype==MIRType::Double||type==MIRType::Float32;}staticinlineboolIsNullOrUndefined(MIRTypetype){returntype==MIRType::Null||type==MIRType::Undefined;}staticinlineboolIsFloatingPointSimdType(MIRTypetype){returntype==MIRType::Float32x4;}staticinlineboolIsIntegerSimdType(MIRTypetype){returnIsSimdType(type)&&SimdTypeToLaneType(type)==MIRType::Int32;}staticinlineboolIsBooleanSimdType(MIRTypetype){returnIsSimdType(type)&&SimdTypeToLaneType(type)==MIRType::Boolean;}staticinlineboolIsMagicType(MIRTypetype){returntype==MIRType::MagicHole||type==MIRType::MagicOptimizedOut||type==MIRType::MagicIsConstructing||type==MIRType::MagicOptimizedArguments||type==MIRType::MagicUninitializedLexical;}staticinlineMIRTypeScalarTypeToMIRType(Scalar::Typetype){switch(type){caseScalar::Int8:caseScalar::Uint8:caseScalar::Int16:caseScalar::Uint16:caseScalar::Int32:caseScalar::Uint32:caseScalar::Uint8Clamped:returnMIRType::Int32;caseScalar::Int64:returnMIRType::Int64;caseScalar::Float32:returnMIRType::Float32;caseScalar::Float64:returnMIRType::Double;caseScalar::Float32x4:returnMIRType::Float32x4;caseScalar::Int8x16:returnMIRType::Int8x16;caseScalar::Int16x8:returnMIRType::Int16x8;caseScalar::Int32x4:returnMIRType::Int32x4;caseScalar::MaxTypedArrayViewType:break;}MOZ_CRASH("unexpected SIMD kind");}staticinlineunsignedScalarTypeToLength(Scalar::Typetype){switch(type){caseScalar::Int8:caseScalar::Uint8:caseScalar::Int16:caseScalar::Uint16:caseScalar::Int32:caseScalar::Uint32:caseScalar::Int64:caseScalar::Float32:caseScalar::Float64:caseScalar::Uint8Clamped:return1;caseScalar::Float32x4:caseScalar::Int32x4:return4;caseScalar::Int16x8:return8;caseScalar::Int8x16:return16;caseScalar::MaxTypedArrayViewType:break;}MOZ_CRASH("unexpected SIMD kind");}staticinlineconstchar*PropertyNameToExtraName(PropertyName*name){JS::AutoCheckCannotGCnogc;if(!name->hasLatin1Chars())returnnullptr;returnreinterpret_cast<constchar*>(name->latin1Chars(nogc));}#ifdef DEBUG// Track the pipeline of opcodes which has produced a snapshot.#define TRACK_SNAPSHOTS 1// Make sure registers are not modified between an instruction and// its OsiPoint.#define CHECK_OSIPOINT_REGISTERS 1#endif // DEBUGenumABIArgType{ArgType_General=0x1,ArgType_Double=0x2,ArgType_Float32=0x3,ArgType_Int64=0x4,RetType_Shift=0x0,ArgType_Shift=0x3,ArgType_Mask=0x7};enumABIFunctionType{// VM functions that take 0-9 non-double arguments// and return a non-double value.Args_General0=ArgType_General<<RetType_Shift,Args_General1=Args_General0|(ArgType_General<<(ArgType_Shift*1)),Args_General2=Args_General1|(ArgType_General<<(ArgType_Shift*2)),Args_General3=Args_General2|(ArgType_General<<(ArgType_Shift*3)),Args_General4=Args_General3|(ArgType_General<<(ArgType_Shift*4)),Args_General5=Args_General4|(ArgType_General<<(ArgType_Shift*5)),Args_General6=Args_General5|(ArgType_General<<(ArgType_Shift*6)),Args_General7=Args_General6|(ArgType_General<<(ArgType_Shift*7)),Args_General8=Args_General7|(ArgType_General<<(ArgType_Shift*8)),// int64 f(double)Args_Int64_Double=(ArgType_Int64<<RetType_Shift)|(ArgType_Double<<ArgType_Shift),// double f()Args_Double_None=ArgType_Double<<RetType_Shift,// int f(double)Args_Int_Double=Args_General0|(ArgType_Double<<ArgType_Shift),// float f(float)Args_Float32_Float32=(ArgType_Float32<<RetType_Shift)|(ArgType_Float32<<ArgType_Shift),// float f(int, int)Args_Float32_IntInt=(ArgType_Float32<<RetType_Shift)|(ArgType_General<<(ArgType_Shift*1))|(ArgType_General<<(ArgType_Shift*2)),// double f(double)Args_Double_Double=Args_Double_None|(ArgType_Double<<ArgType_Shift),// double f(int)Args_Double_Int=Args_Double_None|(ArgType_General<<ArgType_Shift),// double f(int, int)Args_Double_IntInt=Args_Double_Int|(ArgType_General<<(ArgType_Shift*2)),// double f(double, int)Args_Double_DoubleInt=Args_Double_None|(ArgType_General<<(ArgType_Shift*1))|(ArgType_Double<<(ArgType_Shift*2)),// double f(double, double)Args_Double_DoubleDouble=Args_Double_Double|(ArgType_Double<<(ArgType_Shift*2)),// float f(float, float)Args_Float32_Float32Float32=Args_Float32_Float32|(ArgType_Float32<<(ArgType_Shift*2)),// double f(int, double)Args_Double_IntDouble=Args_Double_None|(ArgType_Double<<(ArgType_Shift*1))|(ArgType_General<<(ArgType_Shift*2)),// int f(int, double)Args_Int_IntDouble=Args_General0|(ArgType_Double<<(ArgType_Shift*1))|(ArgType_General<<(ArgType_Shift*2)),// double f(double, double, double)Args_Double_DoubleDoubleDouble=Args_Double_DoubleDouble|(ArgType_Double<<(ArgType_Shift*3)),// double f(double, double, double, double)Args_Double_DoubleDoubleDoubleDouble=Args_Double_DoubleDoubleDouble|(ArgType_Double<<(ArgType_Shift*4)),// int f(double, int, int)Args_Int_DoubleIntInt=Args_General0|(ArgType_General<<(ArgType_Shift*1))|(ArgType_General<<(ArgType_Shift*2))|(ArgType_Double<<(ArgType_Shift*3)),// int f(int, double, int, int)Args_Int_IntDoubleIntInt=Args_General0|(ArgType_General<<(ArgType_Shift*1))|(ArgType_General<<(ArgType_Shift*2))|(ArgType_Double<<(ArgType_Shift*3))|(ArgType_General<<(ArgType_Shift*4))};enumclassBarrierKind:uint32_t{// No barrier is needed.NoBarrier,// The barrier only has to check the value's type tag is in the TypeSet.// Specific object types don't have to be checked.TypeTagOnly,// Check if the value is in the TypeSet, including the object type if it's// an object.TypeSet};enumReprotectCode{Reprotect=true,DontReprotect=false};// Rounding modes for round instructions.enumclassRoundingMode{Down,Up,NearestTiesToEven,TowardsZero};}// namespace jit}// namespace js#endif /* jit_IonTypes_h */